from sqlalchemy import Column, BigInteger, PrimaryKeyConstraint
from models.base import Base

class SysUserPost(Base):
    __tablename__ = 'sys_user_posts'

    user_id = Column(BigInteger, primary_key=True, nullable=False, comment='用户ID')
    post_id = Column(BigInteger, primary_key=True, nullable=False, comment='岗位ID')

    __table_args__ = (
        PrimaryKeyConstraint('user_id', 'post_id', name='pk_sys_user_posts'),
    )

    def __repr__(self):
        return f"<SysUserPost(user_id={self.user_id}, post_id={self.post_id})>"
